<!doctype html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>新闻动态-详情页</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../plugins/mui/mui.min.css" rel="stylesheet" />
		<link href="../../css/news_list/tea_detail.css" rel="stylesheet" />
		<script src="../../js/statistics.js"></script>
		<style>
			.content_main{
				margin-top:44px;
			}
			.header{
				background: #2a2c33;
			}
			.header h1{
				color:#fff;
				font-size:18px;
			}
			.header a{
				color:#fff;
			}
			div {
				overflow-x: hidden;
			}
			.review{
				padding-bottom: 0px;
				margin-bottom:0px; 
			}
			.mui-pull-caption{
				padding-top:0px;
				margin-bottom:0px;
				line-height: 24px;
			}
			.mui-scroll{
				padding-bottom:60px;
			}
			/*标题头行间距*/
			#news_content h2{
				line-height:23px;
			}
			#news_content p{
				word-break: break-all;
				color: inherit;
			}
			#share{
				/*float:right;
				margin-right:5%;
				width:50px;
				height:100%;
				padding: 0px 11px;*/

				float: right;
			    margin-left: 5%;
			    width: auto;
			    height: 100%;
			    padding: 6px 11px;
			}
			#share img{
				width: 20px;
   		 		padding-top: 40%;
			}
			
			/**/
			.mui-bar .mui-title{
				width: 56%;
   		 		padding-left: 20%;
			}
		</style>

	</head>
	<body>
		<header class="mui-bar mui-bar-nav header">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">文体新闻</h1>
			<span id='share'>
				<img src="../../images/icon/news_list/share.png" alt="" />
			</span>
		</header>
		<div class="content_main">
			<div class='mui-content'>
				<div id='news_content'>
					<!--新闻内容-->
					
					
				</div>
			</div>
		</div>
		
		
		<script src="../../plugins/mui/mui.min.js"></script>
		<script src="../../plugins/jquery/jquery-3.1.0.min.js"></script>
		<script src='../../plugins/template/template.js'></script>
		<script src='../../js/md5.js'></script>
		<script src='../../js/getApiToken.js'></script>
		<script src='../../js/fontset.js'></script>
		<!--<script src='../../js/news_list/shareWX.js'></script>-->
		<script src='../../js/literary/news_share.js'></script>
		<script type="text/javascript">
			mui.init({
	
			})
			var user_id,//用户id
				article_id,
				sharehrefimg,//微信图片
				sharehrefDes,//微信新闻信息
				sharehrefTitle,//微信主要内容
				sharehrefID,//微信所需的链接id
				user_token,//用户token
				user_name,
				user_headerimg,
				page_cnt=18,
				time;//评论时间
			//数据列表
			mui.plusReady(function(){
				article_id=plus.webview.currentWebview().detail_id;//列表id
			    sharehrefimg=plus.webview.currentWebview().shareimg;//微信所需的列表图片
			    sharehrefID=article_id;//ID
			    user_id = plus.storage.getItem('cg_user_id');//用户id
				user_token = plus.storage.getItem('cg_user_token');//用户token
				user_name = plus.storage.getItem('cg_nickname');//用户名称
				user_headerimg = plus.storage.getItem('cg_headimgurl');//用户头像
			    myAjax('physical/News/getdetail','get',
			    	{
			    		'id':article_id
						
			    	},function(data){
						console.log(JSON.stringify(data))
						if(data.code == 0){
							var news=
									'<h2>'+data.data.title+'</h2>'+
									'<p style="overflow:auto;">'+
										'<span class="left">'+data.data.create_time+'</span>'+
										'<span class="left" style="padding-left:8px;">'+data.data.source+'</span>'+
									'</p>'+
									'<div class="news">'+data.data.content+'</div>';
							$('#news_content').append(news);
							//新闻内容的超链接
							$("#news_content").delegate('.news a','tap',function(){
								var ahref = $(this).attr('href');
								var aCon=$(this).html();
								skipTo(ahref,aCon,'news_detail');
							})
							//微信显示的标题头信息
							sharehrefTitle=data.data.title;
							sharehrefDes=$('.news').text();//获取详细内容
							
						}
			  		});
				
			});		
			
			//点击跳转
			function skipTo(href,main,pul){
				mui.openWindow({
					url:'../life_housekeeper/detail.html',
					extras:{
						'link':href,
						'title':main,
						'isStorage':pul
					}
				});
			}
		</script>
	</body>
</html>
